package com.qqtech.qquan.idle.service;

import com.qqtech.core.common.exception.OrderException;
import com.qqtech.core.frame.model.Result;
import com.qqtech.core.frame.service.BaseService;
import com.qqtech.qquan.idle.model.IdleBase;
import com.qqtech.qquan.idle.model.IdleBaseVo;

public interface IdleBaseService extends BaseService<IdleBase> {
	/**
	 * 先pv+1,再获取详情
	 * 
	 * @param id
	 * @return
	 */
	IdleBaseVo handleDetail(Integer id);
	
	/**
	 * 用户下单
	 * @param id
	 * @return
	 * @throws OrderException 
	 */
	Result handleOrder(Integer buyerId,Integer idleBaseId,Integer userAddressId) throws OrderException;
	
	/**
	 * 恢复库存
	 * @param id
	 * @return
	 */
	int handleCancle(Integer id);
}